/*CodeBuilder 3.0.1 by 2023-03-17 15:34 */
using System;
using ASmile.ORM.Entitys;

namespace ASmile.ORM.Examples.DBModel
{
	/// <summary>
	/// 
	/// </summary>
	public partial class Test01 : EntityBase
	{
		private int _ID;
		/// <summary>
		/// 
		/// </summary>
		[Entity(CNID, 0, true, IsPrimaryKey = true)]
		public int ID
		{
			get { return _ID; }
			set
			{
				if (!OnPropertyChanged(CNID, _ID, value)) return;
				_ID = value;
				SetFieldChanged(CNID) ;
			}
		}

		private string _Name;
		/// <summary>
		/// 
		/// </summary>
		[Entity(CNName, 1)]
		public string Name
		{
			get { return _Name; }
			set
			{
				if (!OnPropertyChanged(CNName, _Name, value)) return;
				_Name = value;
				SetFieldChanged(CNName) ;
			}
		}

		private int? _Age;
		/// <summary>
		/// 
		/// </summary>
		[Entity(CNAge, 2)]
		public int? Age
		{
			get { return _Age; }
			set
			{
				if (!OnPropertyChanged(CNAge, _Age, value)) return;
				_Age = value;
				SetFieldChanged(CNAge) ;
			}
		}

		private DateTime? _Birthday;
		/// <summary>
		/// 
		/// </summary>
		[Entity(CNBirthday, 3)]
		public DateTime? Birthday
		{
			get { return _Birthday; }
			set
			{
				if (!OnPropertyChanged(CNBirthday, _Birthday, value)) return;
				_Birthday = value;
				SetFieldChanged(CNBirthday) ;
			}
		}

		private decimal? _Salary;
		/// <summary>
		/// 
		/// </summary>
		[Entity(CNSalary, 4)]
		public decimal? Salary
		{
			get { return _Salary; }
			set
			{
				if (!OnPropertyChanged(CNSalary, _Salary, value)) return;
				_Salary = value;
				SetFieldChanged(CNSalary) ;
			}
		}

		private string _Remark;
		/// <summary>
		/// 
		/// </summary>
		[Entity(CNRemark, 5)]
		public string Remark
		{
			get { return _Remark; }
			set
			{
				if (!OnPropertyChanged(CNRemark, _Remark, value)) return;
				_Remark = value;
				SetFieldChanged(CNRemark) ;
			}
		}

		#region 字段名的定义
		public const string CNID = "ID";
		public const string CNName = "Name";
		public const string CNAge = "Age";
		public const string CNBirthday = "Birthday";
		public const string CNSalary = "Salary";
		public const string CNRemark = "Remark";
		#endregion

	}
}
